<template>
  <div class="message_tabs">
    <div style="display: flex; align-items: center">
      <div
        class="tab_item"
        :class="item.value == activetab ? 'active_tab_item' : ''"
        @click="changeactivetab(item.value)"
        v-for="item in tabs"
        :key="item.value"
      >
        {{ item.label }}
      </div>
    </div>
    <div class="all_read" @click="clickallread()">{{languageJson.notice.allRead}}</div>
  </div>
</template>

<script setup>
const props = defineProps({
  tabs: Array,
  activetab: Number,
})
const languageJson = inject('languageJson')
const languageType = inject('languageType')
const emits = defineEmits()

const changeactivetab = value => {
  emits('change', value)
}

const clickallread = () => {
  emits('changeallread')
}
</script>

<style lang="scss" scoped>
.message_tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.tab_item {
  height: 28px;
  line-height: 28px;
  margin-right: 24px;
  font-family: AlibabaPuHuiTi_2_65_;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid #fff;
  cursor: pointer;
}
.active_tab_item {
  font-family: AlibabaPuHuiTi_2_85_;
  font-size: 16px;
  font-weight: bold;
  color: #3711d8;
  border-bottom: 2px solid #3711d8;
}

.all_read {
  // width: 100px;
  padding: 0 12PX;
  height: 28px;
  background-color: #3711d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: AlibabaPuHuiTi_2_55_;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
}
</style>